<?php 
class CAdvertisement extends CBaseAdvertisement {
		
	public function __construct() {
		parent::__construct();
		return true;
	}

	public function deleteAdvertisementsByIds( $arrintAdvertisementIds, $objDatabase ) {
	
		$strSql = ' DELETE FROM `advertisements` WHERE `id` IN(' . implode( ',', $arrintAdvertisementIds ) . ')';
		return parent::deleteRecord( $strSql, $objDatabase );
	}
	
	public function updateAdvertisementsActionByIds( $strAction, $arrintAdvertisementIds, $objDatabase ) {
	
		$strSql = 'UPDATE
						`advertisements`
	
					SET
						`is_active` = ' . $strAction . '
					WHERE
						`id` IN(' . implode( ',', $arrintAdvertisementIds ) . ')';
	
		return parent::updateRecord( $strSql, $objDatabase );
	}
	
}

?>